home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / musictex / older-versions / musictex.502 / LINES.TEX < prev    next >
Text File  |  1992-05-31  |  3KB  |  76 lines

  1. % Cut Here - line.tex
  2.  
  3. % These macros maintain the box of lines used for the leaders
  4.  
  5. \newbox\@linbox
  6. \global\setbox\@linbox\hbox{}
  7. \def\@uplinbox{\global\setbox\@linbox\hbox{}\global\n@l=0\relax
  8. \@uplinboxes}
  9. \def\@uplinboxes{\ifnum\n@l<4\relax\selectligne{\n@l}\ifnum
  10. \l@s=0\relax\else\up@linbox\fi
  11. \global\advance\n@l by 1\relax\@uplinboxes\else\fi}%
  12. \def\up@linbox{\y@ii\l@z\advance\y@ii by-\linthick\relax
  13. \global\setbox\@linbox\hbox{\unhbox\@linbox
  14. \kern-\tenboxwidth\vrule width\tenboxwidth height\l@z depth-\y@ii\relax}}
  15.  
  16. % This macro makes the leaders
  17. \def\@tenleader#1{\@tenuskip=#1\advance\@tenuskip by2\tenboxwidth\relax
  18. \nobreak\kern-\tenboxwidth\nobreak\cleaders\hbox{\unhcopy\@linbox
  19. \unhcopy\@tenubox}\hskip\@tenuskip\kern-\tenboxwidth\nobreak}
  20.  
  21. % Everything that follows is similar to the tie macros, except that there is
  22. % no need to place a special character at each end of a line.
  23.  
  24. % positions x et z de debut des lignes
  25. \newdimen\l@xi\newdimen\l@zi
  26. \newdimen\l@xii\newdimen\l@zii
  27. \newdimen\l@xiii\newdimen\l@ziii
  28. \newdimen\l@xiv\newdimen\l@ziv
  29. % etat des lignes (0= inactive, 1= actif)
  30. %
  31. \newcount\l@si
  32. \newcount\l@sii
  33. \newcount\l@siii
  34. \newcount\l@siv
  35. \newdimen\linthick\linthick0.2pt
  36. %
  37. \def\selectligne#1{{\n@i=#1\relax
  38. \ifnum\n@i<1\relax\n@i=4\fi
  39. \xdef\l@x{\csname l@x\romannumeral\n@i\endcsname}%
  40. \xdef\l@z{\csname l@z\romannumeral\n@i\endcsname}%
  41. \xdef\l@s{\csname l@s\romannumeral\n@i\endcsname}}%
  42. }%
  43. %
  44. % continuation des lignes
  45. \def\clignes{\locx@skip=\x@skip\advance\locx@skip by \n@skip\global\n@l
  46. =0\relax\c@lignes}%
  47. \def\c@lignes{\ifnum\n@l<5\relax\selectligne{\n@l}\ifnum
  48. \l@s=0\relax\else\c@ligne\fi
  49. \global\advance\n@l by 1\relax\c@lignes\fi}%
  50. %
  51. \def\ilin#1#2#3{\selectligne{#1}\global\l@s=1\relax
  52.  \global\l@x=\locx@skip\global\advance\l@x by#2\relax
  53.  \global\l@z=#3\global\advance\l@z by\altportee\relax\up@linbox}
  54. \def\tlin#1{\selectligne{#1}\t@ligne\global\l@s=0\@uplinbox\relax}
  55. %
  56. \def\c@ligne{\y@ii=\x@skip\advance\y@ii by -\l@x
  57. \ifnum\l@s=1\relax
  58.       \raise\l@z\llap{\hbox to\y@ii{\leaders
  59.       \hrule height\z@ depth\linthick\hss}}\relax
  60.       \global\l@x=-1pt
  61. \fi}
  62. %
  63. \def\t@ligne{\y@i=\l@z\relax
  64. \advance\y@i by -\altportee\relax
  65. \y@ii=\locx@skip\advance\y@ii by-\wd@skip\relax
  66. \advance\y@ii by -\l@x\relax
  67.   \ifnum\l@s=1\relax
  68.     \raise\y@i\llap{\vrule height\z@ depth\linthick width\y@ii\hskip\wd@skip}%
  69. \fi}
  70.  
  71. % The lines are activated by adding \clignes to the \ctenuti macro.
  72.  
  73. \let\ctenuti@=\ctenuti\def\ctenuti{\ctenuti@\clignes}
  74.  
  75.  
  76.